<?php
class TopMypageController  extends Controller {

	public function __construct($data) {
        parent::__construct($data);
    }
    
    public function index1() {
          require_once( '../system/ecjp_m.php' );
          $this->_load_php_file("chklogin.php");
          if(!isset($_SESSION['USER'])){	    	
	        require_once( '../system/cookie.php' );  
	      }
	      $this->_load_mdao_class("t_m_goods");
	      $goods_dao = new t_m_goods;
    	   $this->_load_php_file("Class_FUNC.php");
       
    	 if ( isset($_SESSION['USER'])){

    	 	$user = $_SESSION['USER'];	       	   
	       	   
    		
	        $forms = $_SESSION['USER'];

    		$login_id = $forms['USER_id'];
    		$db = new Class_M_DAO;
    		$sql = sprintf("SELECT * FROM D_HOPE WHERE login_id = '%s' AND del<>'*' ",
			mysql_real_escape_string( $login_id ));
    		$data = $db->get_rows( $sql );
    		
    		$wherearr = array();
    		
    		$id = null;
    		foreach($data as $value) {
    			if(isset($value['goods_id']) && (!empty($value['goods_id']))){
    				 $id[] = $value['goods_id']; 
    				 				 
    			}              
           }
    	    if ($id){
    	    $itemid = '"'.implode($id,';').'"';
    	    $this->assign('itemid', $itemid);
    	    	
        	$wherearr[] = " a.id in (".  implode($id, ' , ' ) . ")";
            $goods_data = $goods_dao->search($wherearr);

             foreach ( $goods_data as &$value){
	          if(isset($value['goods_image']) && !empty($value['goods_image'])){
	     	     $value['goods_image'] = Class_FUNC::get_imagepath($value['id'],$value['goods_image'],1);
	       }
             if(isset($value['goods_unitprice']) && !empty($value['goods_unitprice'])){
	          	 $value['goods_rate'] = $value['goods_unitprice']+$value['goods_unitprice'] * RATE;
	          }
	     }     
            
            
             if (isset($goods_data))
	         $this->assign('goods_data', $goods_data);
           }
    		    
          
	     		 
    	   $this->assign('forms', $forms);

    	   
    	     	    
    	   //売上ランキング
	       $sql = "SELECT * FROM `d_goods` WHERE  goods_mark1='1' order by sellbegin desc LIMIT 0,10";
	       $charts_data = $goods_dao->get_rows($sql);
	       foreach ($charts_data as &$value){
	          if(isset($value['goods_image']) && !empty($value['goods_image'])){
	     	     $value['goods_image'] = Class_FUNC::get_imagepath($value['id'],$value['goods_image'],1);
	       }
	        if(isset($value['goods_unitprice']) && !empty($value['goods_unitprice'])){
	          	 $value['goods_rate'] = $value['goods_unitprice']+$value['goods_unitprice'] * RATE;
	          }
	     }     
	       if (isset($charts_data))
	       $this->assign('charts_data',$charts_data);

	     
	       $this->assign('pc_head', $this->fetch('pc/pc_head.html'));
	       $this->assign('pc_foot', $this->fetch('pc/pc_foot.html'));
    	   $this->assign('chartsing', $this->fetch('pc/charts.html'));
    	   $this->display('pc/mypage.html');
        }else {
        		//ヘッド、メニューなどsmarty設定
     	require_once( '../system/ecjp_m.php' );
     	
     	$this->_load_php_file("Class_FUNC.php");
     	
        $this->assign('sex_radios', $ecjp_user_sex);
     	$this->assign('send_radios', $ecjp_user_send);
     	$this->assign('year4', Class_FUNC::get_years());
        $this->assign('moon4', Class_FUNC::get_moons());
     	
        
        
     	$this->_load_Class_DAO_OTHER();
		$dao_local = Class_DAO_OTHER::get_local_array('');
		
		if (isset($dao_local)){
		 	$this->assign('dao_local', $dao_local);
		}

		$this->assign('pc_head', $this->fetch('pc/pc_head.html'));
		$this->assign('pc_foot', $this->fetch('pc/pc_foot.html'));
     	$this->display('pc/join_member.html');
        }    	
    }
    
     public function del(){
     	         require_once( '../system/ecjp_m.php' );
     	         $this->_load_php_file("Class_DB.php");
     	         $p=$this->p;
     	         
     	         $good_id = $p['goods_id'];
     	         $login_id = $p['login_id'];
     	         $sql = sprintf("DELETE FROM D_HOPE WHERE login_id = '%s' AND goods_id = '%s' ",
			     mysql_real_escape_string( $login_id ),
			     mysql_real_escape_string( $good_id ));
     	         
     	         $db = new Class_DB;     	         
     	         $db->query( $sql );
     }
    
     
     public function index2() {
     	  require_once( '../system/ecjp_m.php' );
     	  $this->_load_php_file("chklogin.php");
          if(!isset($_SESSION['USER'])){	    	
	       require_once( '../system/cookie.php' );  
	      }
	       $this->_load_php_file("Class_FUNC.php");
	      
     	    $this->_load_mdao_class("t_m_order");
	        $order_dao = new t_m_order;
     	    $this->_load_mdao_class("t_m_goods");
	        $goods_dao = new t_m_goods;
	        
	        
     	    if ( isset($_SESSION['USER'])){
            
    		 $user_id = $_SESSION['USER']['USER_id'];   		   		 
    		 $forms = $_SESSION['USER']; 
    		 
             $wherearr = array();
             if (isset( $user_id ) && (!empty( $user_id ) )) {
        	 $keyword =  $user_id;
             $wherearr[] = sprintf(" (a.user_id = '%s'  )", $keyword);
           }
	     
          $form = $this->g;
	      if (isset($form['page']) && is_numeric($form['page'])) {
             $dosearch = TRUE;
             $page['current'] = $form['page'];
              } else {
               $page['current'] = 1;
              }
             $page['item'] = PAGE_MAX;
                   
          $order_data = $order_dao->search($wherearr,$page);
	     
          if (isset($order_data))
	      $this->assign('order_data', $order_data);
	     
	      if (isset($page))
          $this->assign('page', $page);
    		
    			     		 
    	   $this->assign('forms', $forms);
	     	    
    	   //売上ランキング
	       $sql = "SELECT * FROM `d_goods` WHERE  goods_mark1='1' order by sellbegin desc LIMIT 0,10";
	       $charts_data = $goods_dao->get_rows($sql);
	       foreach ($charts_data as &$value){
	          if(isset($value['goods_image']) && !empty($value['goods_image'])){
	     	     $value['goods_image'] = Class_FUNC::get_imagepath($value['id'],$value['goods_image'],1);
	       }
	        if(isset($value['goods_unitprice']) && !empty($value['goods_unitprice'])){
	          	 $value['goods_rate'] = $value['goods_unitprice']+$value['goods_unitprice'] * RATE;
	          }
	     }     
	       if (isset($charts_data))
	       $this->assign('charts_data',$charts_data);

	     
	       $this->assign('pageing', $this->fetch('pc/toppage.html'));
    	   $this->assign('chartsing', $this->fetch('pc/charts.html'));
    	   $this->assign('pc_head', $this->fetch('pc/pc_head.html'));
    	   $this->assign('pc_foot', $this->fetch('pc/pc_foot.html'));
    	   $this->display('pc/mypage_buyhis.html');
        }    	
     	      	 
     }
     
      public function index3() {
            require_once( '../system/ecjp_m.php' );
            $this->_load_php_file("chklogin.php");
            if(!isset($_SESSION['USER'])){	    	
	         require_once( '../system/cookie.php' );  
	       }
            $this->_load_php_file("Class_FUNC.php");
     	
            $this->assign('sex_radios', $ecjp_user_sex);
     	    $this->assign('send_radios', $ecjp_user_send);
     	    $this->assign('year4', Class_FUNC::get_years());
            $this->assign('moon4', Class_FUNC::get_moons());
            
            $this->_load_Class_DAO_OTHER();
		    $dao_local = Class_DAO_OTHER::get_local_array('');
		
		    if (isset($dao_local)){
		 	$this->assign('dao_local', $dao_local);
		    }
            
            
     	    $this->_load_mdao_class("t_m_order");
	        $order_dao = new t_m_order;
     	    $this->_load_mdao_class("t_m_goods");
	        $goods_dao = new t_m_goods;
	        $this->_load_mdao_class("t_m_user");
	        $user_dao = new t_m_user;
	        
     	    if ( isset($_SESSION['USER'])){           
    		 $login_id = $_SESSION['USER']['USER_login_id'];   		   		 
    		 $form = $_SESSION['USER'];    		 

    		 
		     $sql = sprintf("SELECT * FROM M_USER WHERE login_id = '%s' ",
			 mysql_real_escape_string( $login_id ));
    		 $data = $user_dao->get_rows($sql);
    		 if(isset($data)){
    		 	 $forms = $data[0];
    		 	 $zipcode = explode("-",$data[0]['zipcode']);
    		 	   if(isset($zipcode)){
    		 	   	   $forms['zipcode1'] = isset($zipcode[0])?$zipcode[0]:'';
    		 	       $forms['zipcode2'] = isset($zipcode[1])?$zipcode[1]:'';
    		 	   }
                 
    		 	 $tel_number = explode("-",$data[0]['tel_number']);
    		       if(isset($tel_number)){
    		 	   	   $forms['tel_number1'] =isset($tel_number[0])?$tel_number[0]:'';
    		 	       $forms['tel_number2'] =isset($tel_number[1])?$tel_number[1]:'';
    		 	       $forms['tel_number3'] =isset($tel_number[2])?$tel_number[2]:'';
    		 	   }
    		 	   
    		 	 $mobile_number =  explode("-",$data[0]['mobile_number']);
    		       if(isset($mobile_number)){
    		 	   	   $forms['mobile_number1'] =isset($mobile_number[0])?$mobile_number[0]:'';
    		 	       $forms['mobile_number2'] =isset($mobile_number[1])?$mobile_number[1]:'';
    		 	       $forms['mobile_number3'] =isset($mobile_number[2])?$mobile_number[2]:'';
    		 	   }
    		 	   
    		 	  if(isset($data[0]['birth'])){
    		 	  	  $forms['birth1'] = substr($data[0]['birth'],0,4);
    		 	  	  $forms['birth2'] = substr($data[0]['birth'],4);
    		 	  }
    		 }
    		    if(isset($forms))
    		    $this->assign('forms', $forms);
           }
      	   
           $this->assign('form', $form);
           
            
           
           
          //売上ランキング
	       $sql = "SELECT * FROM `d_goods` WHERE  goods_mark1='1' order by sellbegin desc LIMIT 0,10";
	       $charts_data = $goods_dao->get_rows($sql);
	       foreach ($charts_data as &$value){
	          if(isset($value['goods_image']) && !empty($value['goods_image'])){
	     	     $value['goods_image'] = Class_FUNC::get_imagepath($value['id'],$value['goods_image'],1);
	       }
	        if(isset($value['goods_unitprice']) && !empty($value['goods_unitprice'])){
	          	 $value['goods_rate'] = $value['goods_unitprice']+$value['goods_unitprice'] * RATE;
	          }
	     }     
	       if (isset($charts_data))
	       $this->assign('charts_data',$charts_data);
           $this->assign('chartsing', $this->fetch('pc/charts.html'));
           $this->assign('pc_head', $this->fetch('pc/pc_head.html'));
           $this->assign('pc_foot', $this->fetch('pc/pc_foot.html'));     
      	   $this->display('pc/mypage_memberinfo_change.html');
      }
      
       public function chkregist(){
       	    require_once( '../system/ecjp_m.php' );
       	    $this->_load_php_file("chklogin.php");
            if(!isset($_SESSION['USER'])){	    	
	        require_once( '../system/cookie.php' );  
	        }
            $this->_load_php_file("Class_FUNC.php");
     	
            $this->assign('sex_radios', $ecjp_user_sex);
     	    $this->assign('send_radios', $ecjp_user_send);
     	    $this->assign('year4', Class_FUNC::get_years());
            $this->assign('moon4', Class_FUNC::get_moons());
            
            $this->_load_mdao_class ( "t_m_user" );
	        $db = new t_m_user;
            
	        $this->_load_mdao_class ( "t_m_goods" );
	        $goods_dao = new t_m_goods;
            
	        
            $this->_load_Class_DAO_OTHER();
		    $dao_local = Class_DAO_OTHER::get_local_array('');
		
		    if (isset($dao_local)){
		 	$this->assign('dao_local', $dao_local);
		    }
            
          if ( isset($_SESSION['USER'])){           
    		 $login_id = $_SESSION['USER']['USER_login_id'];   		   		 
    		 $form = $_SESSION['USER'];     
            }
            
       	require_once( '../system/Class_ERROR.php' );
     	
     	$err = new Class_ERROR ();
     	$forms = $this->p;
     	$chkcols  = array(
			"email1"     => array(CHK_EXIST ,CHK_EMAIL),
     	    "email2"     => array(CHK_EXIST ,CHK_EMAIL),
     	    "login_id"   => array(CHK_EXIST ,CHK_ALNUM),
     	    "login_pwd"  => array(CHK_EXIST ,CHK_ALNUM),
     	    "user_name1"  => array(CHK_EXIST),
     	    "user_name2"   => array(CHK_EXIST),
     	    "user_name_furikana1"  => array(CHK_EXIST),
     	    "user_name_furikana2"   => array(CHK_EXIST),
     	    "zipcode1"    => array(CHK_EXIST),
     	    "zipcode2"     => array(CHK_EXIST),
     	    "local_cd"     => array(CHK_EXIST),
     	    "treet_name1"    => array(CHK_EXIST),
     	    "treet_name2"   => array(CHK_EXIST),
     	    "address"       => array(CHK_EXIST),
     	    "tel_number1"   => array(CHK_EXIST),
     	    "tel_number2"   => array(CHK_EXIST),
     	    "tel_number3"    => array(CHK_EXIST),
     	    "birth1"         => array(CHK_EXIST),
     	    "birth2"         => array(CHK_EXIST)
			 );
         foreach( $chkcols as $kcol => $chkval ) {
				$err_mes [$kcol] = $err->check ( $forms [$kcol], $chkval );
         }
         //
            if(!isset($err_mes ['email2'])){
            	if($forms['email1'] != $forms['email2']){
            		$err_mes ['email2']='<p style="display: block;"  class="error">確認のため、同じメールアドレスを再度入力してください</p>';
            		$err->clear = false;
            	}
            }
            
            if(!isset($err_mes ['login_id'])){
            	 $len = mb_strlen($forms['login_id'],"UTF8");
            	 if($len<6){
            	 	$err_mes ['login_id']='<p style="display: block;"  class="error">6文字以上入力してください</p>';
            	 	$err->clear = false;
            	 } else if($forms['login_id'] == $forms['email1']){
            	 	$err_mes ['login_id']='<p style="display: block;"  class="error">メールアドレスと同じでも構いません</p>';
            	 	$err->clear = false;
            	 } else {
            	 	  if($login_id != $forms['login_id']){
            	 	         $where = array();
            	 	         $where[] = sprintf(" (a.login_id= '%s' )", $forms['login_id']);
            	 	         $data = $db->search($where);
            	 	        if(!empty($data)){
            	 	  	     $err_mes ['login_id']='<p style="display: block;"  class="error">入力されたIDは既に存在しています</p>';
            	 	         $err->clear = false;
            	 	     }      	 	  
            	 	 }
            	 }
            }
            
            if(!isset($err_mes ['login_pwd'])){
            	$len = mb_strlen($forms['login_pwd'],"UTF8");
            	 if($len<6 || $len>10 ){
            	 	$err_mes ['login_pwd']='<p style="display: block;"  class="error">6～10文字入力してください</p>';
            	 	$err->clear = false;
            	 }
            }
            
            if(!isset($forms['sex']) || empty($forms['sex'])){
            	  $err_mes['sex']='<p style="display: block;"  class="error">必須項目です</p>';
            	  $err->clear = false;
            }
            
     
         if($err->clear){            
         	 if (isset ( $forms ))		
		     $this->assign ( 'forms', $forms );
		     if (isset ( $forms['local_cd'] ))
		     $this->assign ( 'local_name', $dao_local[$forms['local_cd']]);
		     if(isset($forms['sent_local_cd'])) 
		     $this->assign ( 'sent_local_name', $dao_local[$forms['sent_local_cd']]);
		     if(isset($forms['sex']))
		     $this->assign ( 'sex', $ecjp_user_sex[$forms['sex']]);
		     if(isset($forms['send']))
		     $this->assign ( 'send', $ecjp_user_send[$forms['send']]);
		     if(isset($form))
             $this->assign ( 'form', $form );
		      //売上ランキング
	         $sql = "SELECT * FROM `d_goods` WHERE  goods_mark1='1' order by sellbegin desc LIMIT 0,10";
	         $charts_data = $goods_dao->get_rows($sql);
	         foreach ($charts_data as &$value){
	          if(isset($value['goods_image']) && !empty($value['goods_image'])){
	     	     $value['goods_image'] = Class_FUNC::get_imagepath($value['id'],$value['goods_image'],1);
	       }
	          if(isset($value['goods_unitprice']) && !empty($value['goods_unitprice'])){
	          	 $value['goods_rate'] = $value['goods_unitprice']+$value['goods_unitprice'] * RATE;
	          }
	     }     
	         if (isset($charts_data))
	         $this->assign('charts_data',$charts_data);
             $this->assign('chartsing', $this->fetch('pc/charts.html'));    
		     
		     
		     $this->assign('pc_head', $this->fetch('pc/pc_head.html'));
		     $this->assign('pc_foot', $this->fetch('pc/pc_foot.html'));
         	 $this->display('pc/mypage_memberinfo.html');
         	 exit;
         }else {
         	 
		     $this->assign ( 'err_mes', $err_mes );    	     
     	     $this->_load_mdao_class("t_m_goods");
	         $goods_dao = new t_m_goods;
	              
     	     
             if(isset($form))
              $this->assign ( 'form', $form );
             
             if (isset ( $forms ))		
		     $this->assign ( 'forms', $forms );
           
          //売上ランキング
	       $sql = "SELECT * FROM `d_goods` WHERE  goods_mark1='1' order by sellbegin desc LIMIT 0,10";
	       $charts_data = $goods_dao->get_rows($sql);
	       foreach ($charts_data as &$value){
	          if(isset($value['goods_image']) && !empty($value['goods_image'])){
	     	     $value['goods_image'] = Class_FUNC::get_imagepath($value['id'],$value['goods_image'],1);
	       }
	        if(isset($value['goods_unitprice']) && !empty($value['goods_unitprice'])){
	          	 $value['goods_rate'] = $value['goods_unitprice']+$value['goods_unitprice'] * RATE;
	          }
	     }     
	       if (isset($charts_data))
	       $this->assign('charts_data',$charts_data);
           $this->assign('chartsing', $this->fetch('pc/charts.html')); 
           $this->assign('pc_head', $this->fetch('pc/pc_head.html'));
           $this->assign('pc_foot', $this->fetch('pc/pc_foot.html'));    
      	   $this->display('pc/mypage_memberinfo_change.html');
     	          	     
         }
		      	 
       }
       
       public function detail(){
       	       //ヘッド、メニューなどsmarty設定
     	     require_once( '../system/ecjp_m.php' );
     	     $this->_load_php_file("chklogin.php");
             if(!isset($_SESSION['USER'])){	    	
	         require_once( '../system/cookie.php' );  
	         }
	          $this->_load_php_file("Class_FUNC.php");
     	      $this->_load_mdao_class ( "t_m_goods" );
	          $goods_dao = new t_m_goods;
     	      $this->_load_mdao_class ( "t_m_order" );
	          $order_dao = new t_m_order;
	          $this->_load_mdao_class ( "t_m_orderdetail" );
	          $orderdetail_dao = new t_m_orderdetail;
	          
       	     if ( isset($_SESSION['USER'])){           
    		 $login_id = $_SESSION['USER']['USER_id'];   		   		 
    		 $form = $_SESSION['USER'];    		
       	     }else {
       	     	exit;
       	     }

       	     
       	     $form = $this->g;
       	     $wherearr = array(); 
          if (isset( $form['order_id'] ) && (!empty( $form['order_id'] ) )) {
        	 $order_data = $order_dao->get($form['order_id']);
        	 $wherearr[] = sprintf(" (a.order_id = '%s'  )", $form['order_id']);
        	 $orderdetail_data = $orderdetail_dao->search($wherearr);
           }
           
           
             if (isset($orderdetail_data))
	         $this->assign('orderdetail_data', $orderdetail_data);

             if (isset($order_data))
	         $this->assign('order_data', $order_data);
     	     
     	     if(isset($form))
             $this->assign ( 'form', $form ); 
             
             if(isset($form['page']))
             $this->assign ( 'page', $form['page'] );
     	     
             //売上ランキング
	       $sql = "SELECT * FROM `d_goods` WHERE  goods_mark1='1' order by sellbegin desc LIMIT 0,10";
	       $charts_data = $goods_dao->get_rows($sql);
	       foreach ($charts_data as &$value){
	          if(isset($value['goods_image']) && !empty($value['goods_image'])){
	     	     $value['goods_image'] = Class_FUNC::get_imagepath($value['id'],$value['goods_image'],1);
	       }
	        if(isset($value['goods_unitprice']) && !empty($value['goods_unitprice'])){
	          	 $value['goods_rate'] = $value['goods_unitprice']+$value['goods_unitprice'] * RATE;
	          }
	     }     
	       if (isset($charts_data))
	       $this->assign('charts_data',$charts_data);
	       
           $this->assign('chartsing', $this->fetch('pc/charts.html'));     
     	   $this->assign('pc_head', $this->fetch('pc/pc_head.html'));
     	   $this->assign('pc_foot', $this->fetch('pc/pc_foot.html'));  
     	   $this->display('pc/mypage_buyhis_detail.html');
       }
       
       
       public function update(){

        //ヘッド、メニューなどsmarty設定
     	   require_once( '../system/ecjp_m.php' );
     	   $this->_load_php_file("chklogin.php");
           if(!isset($_SESSION['USER'])){	    	
	       require_once( '../system/cookie.php' );  
	       }
       	   $this->_load_php_file("Class_FUNC.php");
       	   $this->_load_mdao_class ( "t_m_user" );
		   $dao = new t_m_user;
		   
		   $this->_load_mdao_class ( "t_m_delivery" );
		   $dao_d = new t_m_delivery;
       	
		   $forms = $this->p;
       	   $values = $this->set_user_update_values($forms);
       	   if($dao->edit($forms['id'],$values)){
       	   	   //$_SESSION['USER']['USER_id']	= $forms['id'];
			   $_SESSION['USER']['USER_login_id']	= $forms['login_id'];
			   $_SESSION['USER']['USER_name']	= $forms['user_name1'].'  '.$forms['user_name2'];
			   $_SESSION['USER']['USER_local_cd']	=  $forms['local_cd'];
  
			
			    $this->_load_mdao_class("t_m_goods");
	            $goods_dao = new t_m_goods;
	    
	            $this->_load_mdao_class("t_m_news");
	            $news_dao = new t_m_news;
	     
	     //NEWS message
	     $sql = 'SELECT * FROM  m_news  where 1 order by date desc limit 0,1'; 
	     $news_data = $news_dao->get_rows($sql);
	     if (isset($news_data))
	     $this->assign('news_data', $news_data[0]);
	     
	     
         //新刊案内
         $wherearr = array();
         $wherearr[] = sprintf("(a.goods_mark1= '%s' and a.goods_status= '%s'  )",'1','1');
	     $anni_data = $goods_dao->search_csv($wherearr);
	     if (isset($anni_data))
	     $this->assign('anni_data', $anni_data);
	     
	     //売上ランキング
	       $sql = "SELECT * FROM `d_goods` WHERE  goods_mark1='1' order by sellbegin desc LIMIT 0,10";
	       $charts_data = $goods_dao->get_rows($sql);
	       foreach ($charts_data as &$value){
	          if(isset($value['goods_image']) && !empty($value['goods_image'])){
	     	     $value['goods_image'] = Class_FUNC::get_imagepath($value['id'],$value['goods_image'],1);
	       }
	        if(isset($value['goods_unitprice']) && !empty($value['goods_unitprice'])){
	          	 $value['goods_rate'] = $value['goods_unitprice']+$value['goods_unitprice'] * RATE;
	          }
	     }     
	       if (isset($charts_data))
	       $this->assign('charts_data',$charts_data);
	     
	     //What's New
           $sql = 'SELECT * FROM  m_news order by date desc limit 0,10';
           $newslist_data = $news_dao->get_rows($sql);
           if (isset($newslist_data))
           $this->assign('news_datalist', $newslist_data);
	     
	     //商品category
	       $sql = 'SELECT * FROM  m_categorygood';
           $category_data = $goods_dao->get_rows($sql);
           if (isset($category_data))
           $this->assign('category_data', $category_data);

         $this->assign('categorying', $this->fetch('pc/categorying.html'));
         $this->assign('newsing', $this->fetch('pc/news.html'));
	     $this->assign('chartsing', $this->fetch('pc/charts.html'));
	     $this->assign('pc_head', $this->fetch('pc/pc_head.html'));
	     $this->assign('pc_foot', $this->fetch('pc/pc_foot.html'));
	     $this->display('pc/index.html');
       	   
       	   }
	   
       }
       
      protected function set_user_update_values($forms) {
			$values = array ();		
			$values ["login_id"] = $forms ['login_id'];	
		    $values ["email"] = $forms ['email'];
		    $values ["login_pwd"] = $forms ['login_pwd'];
		    $values ["user_name1"] = $forms ['user_name1'];
		    $values ["user_name2"] = $forms ['user_name2'];
		    $values ["user_name_furikana1"] = $forms ['user_name_furikana1'];
		    $values ["user_name_furikana2"] = $forms ['user_name_furikana2'];
		    $values ["zipcode"] = $forms ['zipcode'];
		    $values ["local_cd"] = $forms ['local_cd'];
		    $values ["treet_name1"] = $forms ['treet_name1'];
		    $values ["treet_name2"] = $forms ['treet_name2'];
		    $values ["address"] = $forms ['address'];
		    $values ["tel_number"] = $forms ['tel_number'];
		    $values ["mobile_number"] = $forms ['mobile_number'];
		    $values ["workshop_name"] = $forms ['workshop_name'];
		    $values ["workshop_name_furikana"] = $forms ['workshop_name_furikana'];
		    $values ["birth"] = $forms ['birth'];
		    $values ["sex"] = $forms ['sex'];
		    $values ["send"] = $forms ['send'];
		    return $values;
	} 
     
}

?>